<template>
  <section class="style-transform-section-skeleton">
    <div class="section-title-skeleton">
      <div class="skeleton-line title-line"></div>
      <div class="skeleton-line divider-line"></div>
    </div>

    <div class="style-grid-container-skeleton">
      <div class="style-grid-skeleton">
        <div v-for="i in 4" :key="i" class="style-item-skeleton">
          <div class="image-wrapper-skeleton">
            <div class="skeleton-block video-block"></div>
          </div>
          <div class="creator-info-skeleton">
            <div class="skeleton-line creator-line"></div>
          </div>
        </div>
      </div>
    </div>

    <!-- 模拟弹窗骨架 -->
    <!-- <div class="matching-popup-skeleton">
      <div class="popup-content-skeleton">
        <div class="popup-header-skeleton">
          <div class="skeleton-line popup-title-line"></div>
          <div class="skeleton-block close-btn-skeleton"></div>
        </div>
        <div class="popup-body-skeleton">
          <div class="popup-video-skeleton">
            <div class="skeleton-block video-popup-block"></div>
          </div>
          <div class="matching-products-skeleton">
            <div v-for="p in 2" :key="p" class="product-item-skeleton">
              <div class="product-image-skeleton">
                <div class="skeleton-block product-img-block"></div>
              </div>
              <div class="product-info-skeleton">
                <div class="skeleton-line product-title-line"></div>
                <div class="skeleton-line product-price-line"></div>
                <div class="skeleton-line product-action-line"></div>
              </div>
            </div>
          </div>
        </div>
      </div>
    </div> -->
  </section>
</template>

<script lang="ts" setup>
// No script logic needed for a pure skeleton component
</script>

<script lang="ts">
// 添加默认导出
export default {
  name: 'StyleTransformSkeleton'
};
</script>

<style scoped lang="scss">
.skeleton-block,
.skeleton-line {
  background: linear-gradient(90deg, #f0f0f0 25%, #e0e0e0 50%, #f0f0f0 75%);
  background-size: 200% 100%;
  animation: skeleton-loading 1.5s infinite ease-in-out;
  border-radius: 4px;
}

@keyframes skeleton-loading {
  0% {
    background-position: 200% 0;
  }
  100% {
    background-position: -200% 0;
  }
}

.style-transform-section-skeleton {
  margin-top: 60px;
  background-color: #fff;
  margin-bottom: 0;
  position: relative;
}

.section-title-skeleton {
  text-align: center;
  margin-bottom: 40px;
  padding-top: 20px; /* Added padding to avoid overlap if sticky header */
}

.title-line {
  width: 300px;
  height: 28px;
  margin: 0 auto 15px auto;
}

.divider-line {
  width: 50px;
  height: 2px;
  margin: 0 auto;
}

.style-grid-container-skeleton {
  margin: 0 auto;
  padding: 0 20px;
}

.style-grid-skeleton {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 20px;
}

.style-item-skeleton {
  overflow: hidden;
}

.image-wrapper-skeleton {
  aspect-ratio: 3 / 4;
  margin-bottom: 10px;
}

.video-block {
  width: 100%;
  height: 100%;
}

.creator-info-skeleton {
  padding: 15px 0;
  text-align: center;
}

.creator-line {
  width: 100px;
  height: 14px;
  margin: 0 auto;
}


/* 响应式样式 for skeleton */
@media (max-width: 992px) {
  .style-grid-skeleton {
    grid-template-columns: repeat(2, 1fr);
    gap: 15px;
  }
  .title-line {
    width: 250px;
    height: 24px;
  }
}

@media (max-width: 576px) {
  .style-grid-skeleton {
    grid-template-columns: 1fr;
    gap: 20px;
  }
  .style-item-skeleton {
    max-width: 400px; /* Consistent with original component */
    margin: 0 auto;
  }
  .title-line {
    width: 200px;
    height: 20px;
  }
  .section-title-skeleton {
    margin-bottom: 30px;
  }
}

/* 模拟弹窗的骨架屏样式 (注释掉的部分，如果需要可以取消注释并完善) */
/*
.matching-popup-skeleton { ... }
.popup-content-skeleton { ... }
.popup-header-skeleton { ... }
.popup-title-line { ... }
.close-btn-skeleton { ... }
.popup-body-skeleton { ... }
.popup-video-skeleton { ... }
.video-popup-block { ... }
.matching-products-skeleton { ... }
.product-item-skeleton { ... }
.product-image-skeleton { ... }
.product-img-block { ... }
.product-info-skeleton { ... }
.product-title-line { ... }
.product-price-line { ... }
.product-action-line { ... }
*/
</style> 